package com.yichang.cco4;

public class Triangle {
    private  int a;
    private  int b;
    private  int c;

    public void triangle(int a,int b,int c){
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    public int getC() {
        return c;
    }

    public void setC(int c) {
        this.c = c;
    }
    public void show(){
        try {
            if (a+b>c&&a+c>b&&b+c>a){
                System.out.println("可以组成三角形!");
            }
        }catch (Exception e){
            System.err.println("a,b,c,不能组成三角形！");
            System.out.println(e.getMessage());
            System.exit(1);
        }finally {
            System.out.println("感谢使用本程序！");
        }
        }
    }

